home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Special 25 / AMIGAplus Sonderheft 25 (2000)(Falke)(DE)(Track 1 of 4)[!].iso / Updates / HD-Installer / jst_dev / sources / OSEmu / slave.asm < prev    next >
Assembly Source File  |  2000-04-12  |  2KB  |  94 lines

  1. ;*---------------------------------------------------------------------------
  2. ;  :Program.    slave.asm
  3. ;  :Contents.    Slave for "xy"
  4. ;  :Author.    Wepl
  5. ;  :Version.    $Id: slave.asm 1.14 1998/12/15 21:07:08 jah Exp jah $
  6. ;  :History.    06.09.98 initial
  7. ;        14.12.98 adapted for WHDLoad v8.1
  8. ;  :Requires.    -
  9. ;  :Copyright.    Public Domain
  10. ;  :Language.    68000 Assembler
  11. ;  :Translator.    Devpac 3.14 / Barfly 2.9
  12. ;  :To Do.
  13. ;---------------------------------------------------------------------------*
  14.  
  15.  IFD BARFLY
  16.     INCDIR    Includes:
  17.     INCLUDE    lvo/exec.i
  18.     INCLUDE    devices/trackdisk.i
  19.     INCLUDE    whdload.i
  20.     OUTPUT    "WArt:xy.Slave"
  21.     BOPT    O+ OG+                ;enable optimizing
  22.     BOPT    ODd- ODe-            ;disable mul optimizing
  23.     BOPT    w4-                ;disable 64k warnings
  24.     SUPER                    ;disable supervisor warnings
  25.  ELSE
  26.     INCDIR    Include:
  27.     INCLUDE    whdload.i
  28.     OUTPUT    dh1:demos/xy.slave
  29.     OPT    O+ OG+            ;enable optimizing
  30.  ENDC
  31.  
  32. ;============================================================================
  33.  
  34. _base        SLAVE_HEADER            ;ws_Security + ws_ID
  35.         dc.w    8            ;ws_Version
  36.         dc.w    WHDLF_NoError        ;ws_flags
  37.         dc.l    $80000            ;ws_BaseMemSize
  38.         dc.l    0            ;ws_ExecInstall
  39.         dc.w    Start-_base        ;ws_GameLoader
  40.         dc.w    0            ;ws_CurrentDir
  41.         dc.w    0            ;ws_DontCache
  42. _keydebug    dc.b    0            ;ws_keydebug
  43. _keyexit    dc.b    $59            ;ws_keyexit = F10
  44.         dc.l    0            ;ws_ExpMem
  45.  
  46.  IFD BARFLY
  47.     DOSCMD    "WDate >T:date"
  48.         dc.b    "$VER: xy.Slave by Wepl "
  49.     INCBIN    "T:date"
  50.         dc.b    0
  51.  ELSE
  52.     dc.b    '$VER: xy HD by Mr.Larmer/Wanted Team - V0.1 (..98)',0
  53.  ENDC
  54.  EVEN
  55.  
  56. ;============================================================================
  57. Start    ;    A0 = resident loader
  58. ;============================================================================
  59.  
  60.         lea    _resload(pc),a1
  61.         move.l    a0,(a1)            ;save for later use
  62.         move.l    a0,a2            ;A2 = resload
  63.  
  64.     ;load the osemu module
  65.         lea    (_OSEmu,pc),a0        ;file name
  66.         lea    ($400).w,a3        ;A3 = OSEmu base address
  67.         move.l    a3,a1            ;address
  68.         jsr    (resload_LoadFileDecrunch,a2)
  69.  
  70.     ;init the osemu module
  71.         move.l    a2,a0            ;resload
  72.         lea    (_base,pc),a1        ;slave structure
  73.         jsr    (a3)
  74.  
  75.     ;switch to user mode
  76.         move.w    #0,sr
  77.  
  78.     ;load the bootblock (do this if neccessary)
  79.         jsr    (_LVODoIO,a6)
  80.         move.l    (IO_DATA,a1),a0
  81.  
  82.     ;call bootblock
  83.         jmp    (12,a0)
  84.  
  85. ;--------------------------------
  86.  
  87. _resload    dc.l    0        ;address of resident loader
  88. _OSEmu        dc.b    'OSEmu.400',0
  89.  
  90. ;============================================================================
  91.  
  92.     END
  93.  
  94.